package com.boot.netty.commons.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * <p>Title:NullWritable</p>
 * <p>Description:写回空对象</p>
 * @version V1.0
 * @author ZhiPeng_Chen
 * @date: 2018/11/14
 */
@Data
public class NullWritable implements Serializable {

    private static final long serialVersionUID = 3426654854033067864L;
    /**
     * 单例
     */
    private static NullWritable instance = new NullWritable();

    /**
     * 私有构造器
     */
    private NullWritable() {
    }

    /**
     * 返回代表Null的对象
     *
     * @return {@link NullWritable} 当方法返回值为void时或返回值为null时返回此对象
     */
    public static NullWritable nullWritable() {
        return instance;
    }
}
